feat(frontend): surface signups-closed reason from loadUserProfile#12621
Merged
AntonioVentilii merged 5 commits intomainfrom Apr 28, 2026
Merged
feat(frontend): surface signups-closed reason from loadUserProfile#12621AntonioVentilii merged 5 commits intomainfrom
loadUserProfile#12621AntonioVentilii merged 5 commits intomainfrom
Conversation
`loadUserProfile` now widens its `ResultSuccess` shape with a typed
failure reason (`signups-closed` | `unknown`). When `createUserProfile`
rejects with `SignupsClosedError`, the service skips the generic error
toast and returns `{ success: false, err: 'signups-closed' }` so callers
can react explicitly (e.g. an info toast + sign-out).
AntonioVentilii
commented
Apr 28, 2026
loadUserProfile
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the frontend loadUserProfile service to distinguish “signups closed” failures from generic failures, enabling callers to respond explicitly without showing a generic error toast.
Changes:
- Extend
loadUserProfilereturn type to include a typed failure reason ('signups-closed' | 'unknown'). - Skip the generic loading-profile toast when the failure is due to
SignupsClosedError. - Update/add unit tests to validate the new failure shape.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/frontend/src/lib/services/load-user-profile.services.ts | Adds typed failure reasons and special-cases SignupsClosedError to return a specific failure reason without a generic toast. |
| src/frontend/src/tests/lib/services/load-user-profile.spec.ts | Updates existing expectations for the new { success: false, err: ... } shape and adds a new signups-closed-focused test. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
DenysKarmazynDFINITY
approved these changes
Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Let
loadUserProfiledistinguish a closed-sign-ups failure from a generic one, so callers can react to it explicitly.Changes
loadUserProfilereturns{ success: false, err: 'signups-closed' | 'unknown' }.SignupsClosedError, skips the generic error toast.Tests
Added tests.